package com.cai.permission.controller;

import com.cai.permission.domain.SysDepartment;
import com.cai.permission.service.TestInterface;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Controller
@RequestMapping("/test")
public class Test {
    @Autowired
    private TestInterface test;

    @RequestMapping("/test")
    @ResponseBody
    public List<SysDepartment> test(){
        System.out.println(test.helloWorld());
        List<SysDepartment> list = test.getDepartmentAll();
        return list;
    }
    @RequestMapping("/test1")
    @ResponseBody
    public String tes1t(){

        return "1111";
    }
}
